Merged
Conversation
monzchan
reviewed
Aug 12, 2025
|
|
||
| SELECT *, quantity * cost_to_customer_per_qty AS price | ||
| FROM customer_purchases | ||
| WHERE vendor_id BETWEEN 8 AND 10; /* Note: Just curious myself, unsure if BETWEEN can be set as inclusive or exclusive like other languages. */ |
There was a problem hiding this comment.
BETWEEN is always inclusive (both ends)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
An entity-relationship diagram was created with a .pdf file, followed by SQL queries in a .sql file with my personal comments. The queries include selecting specific columns or rows, deriving new columns, recategorizing values, using wildcards (e.g., %), and filtering based on defined conditions like total amount spent.
What did you learn from the changes you have made?
I learned how to write and run basic SQL queries in SQLite, get a better familiarity of how to use Git commands to push updates to GitHub again, and have a good grasp of applying entity-relationship diagrams to visualize the structure of a database with multiple tables.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
I considered using both VS Code and DB Browser to run SQL queries, as it would be a good window to get familiar with each tool and compare results. However, I realized it is more effective to focus on one tool at a time, especially at first, and switch to the next when ready.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
One challenge was getting familiar with the structure of SQL queries. Unlike languages like R or Python, I felt like SQL has a more rigid, predefined order for its keywords, which I think will take more time to get used to. Working on small additional projects myself could be a helpful way to reinforce my learning in a short period of time.
How were these changes tested?
Once I completed a query, I often tried alternative methods, if available, to see if I could achieve the same results. I also reviewed the raw dataset to check for consistency between the output and the original data, which I think is important.
A reference to a related issue in your repository (if applicable)
None.
Checklist